<template>
	<div>


		<el-table :data="result.tableData" style="width: 100%" size="mini">
			<el-table-column prop="username" label="用户名" width="180">
			</el-table-column>

			<el-table-column prop="password" label="密码" width="180">
			</el-table-column>

			<el-table-column prop="nickname" label="昵称">
			</el-table-column>
		</el-table>


	     <el-pagination
	       style="margin-top:20px;"
	       background
	       layout="prev, pager, next"
	       :page-count="result.pages"
	       :current-page.sync="query.current"
	       :page-size="query.size"
	       @current-change="list()">
	     </el-pagination>





	</div>
</template>

<script>
	export default {
		name: 'User',
		data() {
			return {
				name: '用户页面',

				search: {
					username: ''
				},
				query: {
					username: '',
					current: 1,
					size: 10
				},
				result: {
					tableData: [],
					pages: 0
				},
				
			}
		},
		methods: {
			list() {
				let url = "/umsUser/list"
				this.getReq(url, resp => {
					console.log(resp)
					this.result.tableData = resp.records;
					this.query.current = resp.current;
					this.result.pages = resp.pages

				}, this.query)
			}
		},
		created() {
			this.list();
		}

	}
</script>

<style scoped>


</style>
